Tunisia 's national assembly approved the country 's landmark new constitution -- its first since the ouster of longtime president Zine El-Abidine Ben Ali three years ago .

The text was passed with 200 votes , the state news agency TAP reported . Twelve members voted against the measure , and four abstained .

Alongside the vote , Prime Minister Mehdi Jomaa appointed a caretaker Cabinet as part of a deal to end a crisis between Tunisia 's Islamist party and its secular opposition until new elections .

The approval of the new constitution is one of the last steps to establishing full democracy in the North African country , the cradle of the 2011 Arab Spring uprisings that toppled autocratic leaders in one of the most conservative corners of the world .

Its drafting lasted two years and exposed a deep rift between the Islamist Ennahda party and the secular opposition .

But after months of political crisis and sporadic violence , Sunday 's milestones contrast sharply with messy transitions in regional neighbors Libya and Egypt -- still caught up in turmoil after ousting their own longtime leaders in 2011 revolts .

Celebrating the vote , assembly members made victory signs and sang the national anthem , TAP reported .

`` All eyes around the world are fixed on Tunisia 's democratic experience , '' assembly chief Mustafa Ben Jaafar was quoted as saying by TAP .

Political turmoil

The once-banned moderate Islamist Ennahda party won elections in October 2012 -- the first after Ben Ali 's ouster in January 2011 -- and formed an Islamist-led government .

But political turmoil has beset the country , which relies heavily on foreign tourists for revenues .

Under a deal agreed between Ennahda and the opposition , the ruling party agreed to hand over power once parties had finished writing a new constitution and appointed an electoral commission to oversee new elections .

TAP said Jomaa 's new government was made up of 21 ministers and seven secretaries of state . It consists mainly of technocrats

Jomaa , an engineer and former minister , was appointed premier in December .

Tunisia represents a rare bright spot in a still volatile region following the Arab Spring uprisings .

Two years after Moammar Gadhafi was toppled , Libya 's government is weakened by political infighting and fragile security forces , a constitution has yet to be drafted and armed militias do as they please in a country awash with weapons .

Egypt 's own elected Islamist president , Mohamed Morsy , was deposed by the army . The country 's interim government has labeled his Muslim Brotherhood organization as a terrorist group .

Egyptians this month approved their new constitution as part of a transition plan from army chief Gen. Abdel Fattah el-Sisi after he ousted Morsy in July .

Editors ' Note : This article has been edited to remove plagiarized content after CNN discovered multiple instances of plagiarism by Marie-Louise Gumuchian , a former CNN news editor .

@highlight

Tunisia 's national assembly approves a landmark constitution

@highlight

It 's the first constitution since longtime leader Ben Ali 's ouster in 2011

@highlight

The prime minister , a technocrat , also appoints new caretaker government

@highlight

The milestones contrast sharply to messy transitions in Libya , Egypt and Yemen